package gdma.hqdes.service;

import gdma.hqdes.bean.Article;
import gdma.hqdes.bean.ArticleTemplate;
import org.springframework.data.domain.Page;

import javax.annotation.Nullable;

public interface ArticleService {

    ArticleTemplate getTemplate(Integer templateId);

    Page<ArticleTemplate> listTemplates(@Nullable String keyword, int... pagination);

    ArticleTemplate saveTemplate(ArticleTemplate template);

    Article getArticle(Long id);

    Page<Article> listArticles(@Nullable Integer templateId, @Nullable Long projectId, @Nullable Long unitId, @Nullable String keyword, int... pagination);

    Article saveArticle(Article article);

    boolean deleteArticle(Long id);

}
